package edu.vt.ece3574.ninjatag;

import java.util.List;

public class AGame implements GameIf{ //Hi Craig.
	// I never explained this, but the "A" part of the name is short for "Abstract."
	// Just like the "If" tag is for "Interface."
	// This was just the convention I was taught at my job, though.
	// You should delete these comments after you read them.
	
	private String gameName_ = null;
	private String gameType_ = null;
	private long endTime_ = 0;
	public List<PlayerIf> playerList_ = null;
	//TODO: save between sessions
	
	public AGame(){};
	
	public void buildGame(String name, String type, long end){
	
		gameName_ = name;
		endTime_ = end;
		gameType_ = type;
	}
	
	@Override
	public List<PlayerIf> getPlayers(){
		
		if(playerList_ != null) return playerList_;
		else return null;
	}
	
	
	@Override
	public long endTime(){
		
		if(endTime_ != 0) return endTime_;
		else return 0;
		
		
	}
	
	@Override
	public String getName(){
		
		if(gameName_ != null) return gameName_;
		else return null;
		
	}
	
	@Override
	public String getType(){
		if(gameType_ != null) return gameType_;
		else return null;
	}
	
	public void addPlayer(APlayer newPlayer){
		
		playerList_.add(newPlayer);
	
	}
	
	
	
	

}
